﻿using System;
using System.Linq;
using Landpy.CruiseControlNet.FacadeInterface.ConfigurationModule;
using Landpy.CruiseControlNet.FacadeInterface.RepositoryModule;
using Landpy.CruiseControlNet.Infrastructure.Aop.WrapAttribute;

namespace Landpy.CruiseControlNet.DomainLayer.RepositoryModule
{
    public class PublisherRepository : IPublisherRepository
    {
        [NotThrowException]
        [ExceptionMessageBox]
        [LogException]
        public Publisher GetPublisherById(Project project, Guid id)
        {
            return (from Publisher publisher in project.Publishers
                    where publisher.Id == id
                    select publisher).FirstOrDefault();
        }
    }
}